/***********************************************************************
    filename:   DaterCalendarYear.h
    created:    21/4/2012
    author:     4Ys

    purpose:    Defines the year class used in calendar
*************************************************************************/
#ifndef _DaterCalendarYear_h_
#define _DaterCalendarYear_h_

#include "DaterCalendarMonth.h"

#include <vector>

namespace Dater
{
	/*!
	\brief
		An entity class contains 12 month calendars.
	*/
	class CalendarYear
	{
	public:
		/*!
		\brief
			Constructor of class ClendarYear

		\param
			- an integer means year

		\param useID
			- an integer means useID.
			- useID points to a disdinct user.
		*/
		CalendarYear(int year);

		/*!
		\brief
			Destructor of class CalendarYear
		*/
		~CalendarYear();

		/*!
		\brief
			Return value _year;

		\param
			an integer means year
		*/
		int getYear();

		/*!
		\brief
			Get the CalendarMonth of th given month

		\param month
			The month of the Calendar.

		\return
			Pointer to the CalendarMonth of the given month
		*/
		CalendarMonth* getMonthCalendar(int month);

		void addEvent(Event*);

		void deleteEvent(Event*);

	private:
		/*!
		 - an integer of this date means year.
		 - since 1970.
		*/
		int _year;

		//! The list of 12 month calendars attach to the year calendar
		std::vector<CalendarMonth*> _months;

		/*! 
		 - an integer means the number of months of this year
		 - always 12.
		*/
		int _dayNum;
	};
}

#endif